/* 基础重置与字体设置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Fira Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f8f9fa;
}

/* 标题样式 */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3e8ee;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #34495e;
    margin: 2rem 0 1rem;
}

/* 段落样式 */
p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    text-align: justify;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

pre {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1.2rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border-radius: 0 4px 4px 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 代码样式 */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #d63384;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* 引用块样式 */
blockquote {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
    border-radius: 0 4px 4px 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* 列表样式 */
ul, ol {
    margin: 1.2rem 0;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 图像样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e3e8ee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    blockquote {
        padding: 0.8rem 1rem;
    }
    
    ul, ol {
        padding-left: 1.5rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}
